<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    // 求 10 的阶乘
    // 累乘器，初始值必须是 1
    var mul = 1;
    for (var i = 10 ; i >= 1 ; i--) {
      mul *= i;
    }
    // 循环结束后使用累乘结果
    console.log(mul);
  </script>
</head>
<body>
  
</body>
</html>